package com.dwb.controller;
import com.dwb.entity.SYjfk;
import com.dwb.result.Result;
import com.dwb.service.SYjfkService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

/**
 * @Author manke
 * @Date 2020/6/27 18:18
 * @Version 0.0.1
 */
@Api(value = "SYjfk",description = "意见反馈控制器")
@RestController
public class SYjfkController {

    @Autowired
    private SYjfkService sYjfkService;
    @ApiOperation(value = "getList",notes = "获取意见反馈列表")
    @PostMapping("/getList")
    public Result<PageInfo<SYjfk>> getList(@RequestBody Map<String,String > parameters){
        Result<PageInfo<SYjfk>> result = Result.newSuccess();
        PageInfo<SYjfk> list = sYjfkService.getList(parameters);
        result.setDataMap(list);
        return result;
    }

    @ApiOperation(value = "getInfo",notes = "获取意见反馈详情")
    @PostMapping("/getInfo")
    public Result<Map<String,Object>> getInfo(Map<String,Object > parameters){
        Result<Map<String,Object>> result = Result.newSuccess();
        Map<String, Object> info = sYjfkService.getInfo(parameters);
        result.setDataMap(info);
        return result;
    }



}
